#============================================================
#    Priority Connector Test
#============================================================
# - datetime: 2022-12-02 21:59:28
#============================================================
extends Node2D


signal test_signal(v)


func _ready() -> void:
	
	var priority_connector = PriorityCallableConnector.instance(self)
	priority_connector.connect_signal(self.test_signal, func(v):
		print("调用优先级为5的方法")
	, 5)
	
	priority_connector.connect_signal(self.test_signal, func(v):
		print("调用优先级为4的方法")
	, 4)
	
	priority_connector.connect_signal(self.test_signal, func(v):
		print("调用优先级为8的方法")
	, 8)
	
	priority_connector.connect_signal(self.test_signal, func(v):
		print("调用优先级为9的方法")
	, 9)
	
	priority_connector.connect_signal(self.test_signal, func(v):
		print("调用优先级为0的方法")
	, 0)
	
	self.test_signal.emit("test")

